<template>
  <div>
    <ul class="cardWrap" v-for="(i, index) in dataObject" :key="index" @click="toBuy(i)">
      <li>{{ i.custName }}</li>
      <li>绑定车牌号: {{i.carNumber}}</li>
      <li>生效时间: {{i.validStartTime | formatTime}}</li>
      <li>有效时间至: {{i.validEndTime | formatTime}}</li>
      <li>适用停车场: {{i.plName}}</li>
    </ul>


  </div>
</template>

<script>
export default {
  name: 'buyCardList',
  data() {
    return {
      dataObject: [],
      status: '请开票',
      disableFlag: false,
    }
  },
  computed: {

  },
  mounted() {
    this.dataObject = JSON.parse(sessionStorage.getItem('cardIfo'))
    console.log(this.dataObject)

  },
  methods: {
    toBuy:function(i) {
      console.log(i)
      sessionStorage.setItem("cardDetail", JSON.stringify(i));
      this.$router.push({
        path: "buyCard"
      });
    }
  }
}
</script>

<style scoped lang="scss">
  .cardWrap {
    width: 95%;
    height: 230px;
    margin: 0 auto;
    padding: 60px 0 0 30px;
    background: url("../assets/images/cardBG1.png") no-repeat;
    background-size: 100% 100%;
    color: #FFF;
    font-size: 18px;
    li {
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
  }
</style>
